package com.example.bigeventMaven;

import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * Created by 10446 on 2017/9/10.
 */
@Controller
public class writeCon {
    @RequestMapping("/write")
    String getWrite(Model model, HttpServletRequest request){
        model.addAttribute("header","testMapping");
        Cookie cookie[] =   request.getCookies();
        System.out.println(cookie[0].getName());
        System.out.println(cookie[0].getValue());
        model.addAttribute("cookie",cookie);
        return "write";
    }
}
